using System.Collections;
using UnityEngine;

[System.Serializable]
public class StaticDataContainer : DataContainer<AbstractStatic> {
	private string staticId; //A unique identifier for this static data object.
	
	public StaticDataContainer ()
	{
	}
	
	public override void CopyTo (ReadOnlyable target)
	{
		if (!(target is StaticDataContainer))
		{
			Debug.LogError("Target must be of type '" + typeof(StaticDataContainer) + "'.");
			return;
		}
		
		StaticDataContainer targetDataContainer = (StaticDataContainer)target;
		
		base.CopyTo(targetDataContainer);
		
		targetDataContainer.StaticId = staticId;
	}
	
	public string StaticId
	{
		get
		{
			return staticId;
		}
		set
		{
			if (ReadOnly)
			{
				LogErrorWriteToReadOnly();
				return;
			}
			staticId = value;
		}
	}
}